package com.poi.demopoi.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("employee")
@NoArgsConstructor
public class Employee implements Serializable {


    private static final long serialVersionUID = 1L;

    //    @TableId(value = "id", type = IdType.AUTO)
    @TableId
    private Long id;
    private String name;
    private Integer age;
    private String email;

    @TableField(exist = false)
    private List<OrderItem> orders;
    @TableField(exist = false)
    private Integer current;
    @TableField(exist = false)
    private Integer size;


    public Employee(Long id, String name, Integer age, String email) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.email = email;
    }
}
